package eu.livotov.jsms;

import java.util.*;

/**
 * Created by IntelliJ IDEA.
 * User: dlivotov
 * Date: 26.11.11
 * Time: 14:55
 * To change this template use File | Settings | File Templates.
 */
public class SMSMessage
{

    private String id = UUID.randomUUID().toString();

    private Date deliveryDate;

    private String text;

    private List<String> numbers = new ArrayList<String>();

    private String sender;


    public SMSMessage(String sender, String text, String... numbers)
    {
        this.numbers.addAll(Arrays.asList(numbers));
        this.text = text;
        this.sender = sender;
    }

    public SMSMessage(String sender, String text, Date deliveryDate, String... numbers)
    {
        this(sender,text,numbers);
        this.deliveryDate = deliveryDate;
    }

    public String getId()
    {
        return id;
    }

    public void setId(final String id)
    {
        this.id = id;
    }

    public Date getDeliveryDate()
    {
        return deliveryDate;
    }

    public void setDeliveryDate(final Date deliveryDate)
    {
        this.deliveryDate = deliveryDate;
    }

    public String getText()
    {
        return text;
    }

    public void setText(final String text)
    {
        this.text = text;
    }

    public List<String> getNumbers()
    {
        return numbers;
    }

    public void setNumbers(final Collection<String> numbers)
    {
        this.numbers.clear();
        this.numbers.addAll(numbers);
    }

    public String getSender()
    {
        return sender;
    }

    public void setSender(final String sender)
    {
        this.sender = sender;
    }
}
